<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */

$this->pageTitle=Yii::app()->name . ' - '.Yii::t('default', 'Contact');
$this->breadcrumbs=array(
Yii::t('default', 'Contact'),
);
?>
<!-- **Primary Section** -->
<section id="primary" class="content-full-width">

<?php if(Yii::app()->user->hasFlash('contact')) {?>

<div class="alert alert-success">
  <?php echo Yii::app()->user->getFlash('contact'); ?>
</div>

<?php }?>

 <div class="column one-third">
   <h3><?php echo Yii::t('default', 'Ben Thanh Market Map')?></h3>
   <div>
      <img width="100%" src="<?php echo Yii::app()->baseUrl; ?>/images/benthanh_map.png"/>
   </div>
</div>
<div class="column two-third last">
  <iframe width="650" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=vi&amp;geocode=&amp;q=Ch%E1%BB%A3+B%E1%BA%BFn+Th%C3%A0nh,+B%E1%BA%BFn+Th%C3%A0nh,+H%E1%BB%93+Ch%C3%AD+Minh,+Vi%E1%BB%87t+Nam&amp;aq=0&amp;oq=cho+ben+&amp;sll=37.0625,-95.677068&amp;sspn=40.59616,86.572266&amp;ie=UTF8&amp;hq=&amp;hnear=Ch%E1%BB%A3+B%E1%BA%BFn+Th%C3%A0nh,+B%E1%BA%BFn+Th%C3%A0nh,+H%E1%BB%93+Ch%C3%AD+Minh,+Vi%E1%BB%87t+Nam&amp;ll=10.771928,106.698328&amp;spn=0.003083,0.005284&amp;t=m&amp;z=14&amp;output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=vi&amp;geocode=&amp;q=Ch%E1%BB%A3+B%E1%BA%BFn+Th%C3%A0nh,+B%E1%BA%BFn+Th%C3%A0nh,+H%E1%BB%93+Ch%C3%AD+Minh,+Vi%E1%BB%87t+Nam&amp;aq=0&amp;oq=cho+ben+&amp;sll=37.0625,-95.677068&amp;sspn=40.59616,86.572266&amp;ie=UTF8&amp;hq=&amp;hnear=Ch%E1%BB%A3+B%E1%BA%BFn+Th%C3%A0nh,+B%E1%BA%BFn+Th%C3%A0nh,+H%E1%BB%93+Ch%C3%AD+Minh,+Vi%E1%BB%87t+Nam&amp;ll=10.771928,106.698328&amp;spn=0.003083,0.005284&amp;t=m&amp;z=14" style="color:#0000FF;text-align:left">Xem Bản đồ cỡ lớn hơn</a></small>
</div>


<div class="clear"></div>

<div class="hr-invisible">
</div>

<div class="column one-third">
  <h3><?php echo Yii::t('default', 'Contact Details') ?></h3>

  <div class="contact-details">
    <p>Shop 103 - <?php echo Yii::t('default', 'Ben Thanh Market'); ?></p>
    <p>
      <span class="icon-phone"> </span> <strong><?php echo Yii::t('default', 'Phone')?></strong> :
      <?php echo $adminInfo->phone?>
    <p>
      <span class="icon-mobile-phone"> </span> <strong><?php echo Yii::t('default', 'Cell Phone')?></strong> :
      <?php echo $adminInfo->cell_phone?>
    </p>
    <p>
      <span class="icon-envelope-alt"> </span> <strong>Email</strong> :
      <a href="mailto:<?php echo $adminInfo->email?>"><?php echo $adminInfo->email?></a>
    </p>
    <p>
      <span class="icon-globe"> </span> <strong>Website</strong> : <a
        href="<?php echo Yii::app()->baseUrl; ?>" title="">www.benthanhshopping.com</a>
    </p>
  </div>
</div>
<div class="column two-third last">
  <h3><?php echo Yii::t('default', 'Send us a message')?></h3>
  <?php $form=$this->beginWidget('CActiveForm', array(
    'id' => 'contact-form'
  )); ?>
  <?php echo $form->errorSummary($model, '', '', array('class' => 'alert alert-error')); ?>
    <p class="column one-half">
      <?php echo $form->textField($model, 'name', array(
        'placeholder' => Yii::t('default', 'Your Name'),
        'required'    => 'required'
      ))?>
    </p>
  
    <p class="column one-half">
      <?php echo $form->emailField($model, 'email', array(
        'placeholder' => Yii::t('default', 'Your Email'),
        'required'    => 'required'
      ))?>
    </p>
    
    <p class="column one-column">
      <?php echo $form->textField($model, 'subject', array(
        'placeholder' => Yii::t('default', 'Subject'),
        'required'    => 'required'
      ))?>      
    </p>

    <p class="column one-column">
      <?php echo $form->textArea($model, 'body', array(
        'placeholder' => Yii::t('default', 'Your Message'),
        'required'    => 'required',
        'cols'        => 5,
        'rows'        => 3
      ))?>
    </p>

    <?php if(CCaptcha::checkRequirements()) { ?>
    <p class="column one-column clear">
      
      <?php $this->widget('CCaptcha', array(
        'buttonLabel' => '<i class="icon-refresh"></i>',
        'clickableImage'=>true,
    		'imageOptions'=>array('id'=>'img_captcha')
      )); ?>
      <?php echo $form->textField($model,'verifyCode', array(
        'placeholder' => Yii::t('default', 'Verify Code'),
        'required'    => 'required'
      ))?>
    </p>
    <div class="hint clear">
      <?php echo Yii::t('default', 'Please enter the letters as they are shown in the image above.<br/>Letters are not case-sensitive.')?>
    </div>
    <?php } ?>

    <p>
      <input name="submit" type="submit" value="<?php echo Yii::t('default', 'Send')?>">
    </p>
  <?php $this->endWidget(); ?>
</div>
</section>
<script type="text/javascript">
$(function() {
  $(window).load(function(){
		$("#img_captcha").trigger("click");
	});
});
</script>